'use strict'


import Http from '../kit/HttpKit'
import Api from './Api'

const URL_LIST = Api.API_URL + '/expert/list'
const URL_CHECK_STATUS_PASS = Api.API_URL + '/expert/checkStatusPass'
const URL_CHECK_STATUS_FAIL = Api.API_URL + '/expert/checkStatusFail'

/**
* 智囊团模块
**/
const list = (data, callback)=>{
	var url = Api.API_URL + '/expert/list';

	data.api_token = Api.getApiToken();
	data.api_user_id = Api.getApiUserId();

	Http.post(url, data, json=>{
		Api.getDataCB(json, callback);
	});
}

const detail = (expertId, callback)=>{
	var url = Api.API_URL + '/expert/detail';

	let data = {id: expertId};
	data.api_token = Api.getApiToken();
	data.api_user_id = Api.getApiUserId();

	Http.post(url, data, json=>{
		Api.getDataCB(json, callback);
	});
}

export default{
	list, detail, 
	URL_LIST, URL_CHECK_STATUS_PASS, URL_CHECK_STATUS_FAIL
}
